import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/shop/ebay/list`,
      method: 'post',
      data
    })
  },
  // 添加
  create(data) {
    return request({
      url: `/v1/shop/ebay/create`,
      method: 'post',
      data
    })
  },
  // 详情
  detail(params) {
    return request({
      url: `/v1/shop/ebay/detail`,
      method: 'get',
      params
    })
  },
  // 店铺绩效-不良表现
  getDefect(params) {
    return request({
      url: `/v1/shop/ebay/get-defect`,
      method: 'get',
      params
    })
  },
  // 店铺绩效-海外仓服务
  getOverseas(params) {
    return request({
      url: `/v1/shop/ebay/get-overseas`,
      method: 'get',
      params
    })
  },
  // 评价分布
  feedbackCount(params) {
    return request({
      url: `/v1/shop/ebay/get-feedback`,
      method: 'get',
      params
    })
  },
  // 评价列表
  feedbackList(data) {
    return request({
      url: `/v1/shop/ebay/get-feedback-detail`,
      method: 'post',
      data
    })
  },
  // 公司详情
  companyDetail(params) {
    return request({
      url: `/v1/company/detail`,
      method: 'get',
      params
    })
  },
  // erp详情
  eprDetail(params) {
    return request({
      url: `/v1/epr/detail`,
      method: 'get',
      params
    })
  },
  // 编辑
  edit(data) {
    return request({
      url: `/v1/shop/ebay/update`,
      method: 'post',
      data
    })
  },
  // 授权
  auth(data) {
    return request({
      url: `/v1/shop/ebay/get-ebay-token`,
      method: 'post',
      data
    })
  },
  // 更新授权
  updateAuth(data) {
    return request({
      url: `/v1/shop/ebay/update-token`,
      method: 'post',
      data
    })
  },
  // 授权链接
  link(params) {
    return request({
      url: `/v1/shop/ebay/link`,
      method: 'get',
      params
    })
  },
  // 查看余额信息
  getMoneyDetail(params) {
    return request({
      url: `/v1/shop/ebay/get-money-detail`,
      method: 'get',
      params
    })
  },
}
